<include file="Public:header" />
<!---编辑团购-->
<form id="info_form" action="{:U('Group/edit')}" method="post" enctype="multipart/form-data">
<input type="hidden" value="{$info.id}" name="id">
<div class="pad_lr_10">
	<div class="col_tab">
		<ul class="J_tabs tab_but cu_li">
			<li class="current">基本信息</li>
            <li>SEO设置</li>
		</ul>
		<div class="J_panes">
			<div class="content_list pad_10">
				<table width="100%" cellspacing="0" class="table_form">
                    <tr>
                        <th width="120">选择楼盘 :</th>
                        <td>
                            <span id="house_name">{$house.title}</span>
                            <button class="J_showdialog" data-pic="0" data-uri="{:U('House/publicSelectHouse', array('menuid'=>$menuid))}" data-acttype="ajax" data-title="选择楼盘" data-id="select" data-width="670" data-height="500" data-boxtype="radio" data-boxname="house_id" data-val="house_id" data-displaybox="house_name">选择楼盘</button>
                            <input type="hidden" name="house_id" id="house_id" value="{$house.id}">
                        </td>
                    </tr>
                    <tr>
                        <th>所属地区 :</th>
                        <td>
                            <select name="area_id">
                                <option value="0">--请选择--</option>
                                <volist name='house_cate' id='vo'>
                                    <option <php>if($vo['id']==$info['area_id']){</php>selected="selected" <php>}</php> value="{$vo.id}">{$vo.name}</option>
                                </volist>
                            </select>
                        </td>
                    </tr>
		            <tr>
						<th>标题 :</th>
						<td>
							<input type="text" name="title" value="{$info.title}" id="J_title" class="input-text" size="40">
		                </td>
					</tr>
                    <tr>
                        <th>广告语 :</th>
                        <td>
                            <textarea name="desc" id="desc" style="width:600px;height:50px;resize: none;">{$info.desc}</textarea>
                        </td>
                    </tr>
                    <tr>
                        <th>原折扣 :</th>
                        <td>
                            <input type="text" name="original_price"  value="{$info.original_price}" class="input-text" size="60">
                        </td>
                    </tr>
                    <tr>
                        <th>现折扣 :</th>
                        <td>
                            <input type="text" name="present_price" value="{$info.present_price}" class="input-text" size="60">
                        </td>
                    </tr>
                    <tr>
                        <th>特色标签 :</th>
                        <td>
                            <input type="text" name="tags" value="{$info.tags}" class="input-text" size="60">&nbsp;多个使用,号 隔开
                        </td>
                    </tr>
                    <tr>
                        <th>报名人数 :</th>
                        <td>
                            <input type="text" name="number" value="{$info.number}" class="input-text" size="20">
                        </td>
                    </tr>
                    <tr>
                        <th>开始时间 :</th>
                        <td>
                            <input type="text" name="start_time" id="J_start_time" value="{$info.start_time|date='Y-m-d',###}" onclick="myCalendar();" class="date" size="12" />
                            结束时间 :
                            <input type="text" name="end_time" id="J_end_time" value="{$info.end_time|date='Y-m-d',###}" onclick="myCalendar();" class="date" size="12" />
                        </td>
                    </tr>
                    <tr>
                        <th>缩略图:</th>
                        <td>
                            <notempty name="info['img']"><img src="{$info.img}" width="100" height="100"/><br /></notempty>
                            <input type="file" name="img" id="img" class="input-text"  style="width:200px;" /><span> 200*145</span></td>
                    </tr>
                    <tr>
                        <th>列表页图:</th>
                        <td>
                            <notempty name="info['list_img']"><img src="{$info.list_img}" width="100" height="100"/><br /></notempty>
                            <input type="text" name="list_img" id="J_img" value="{$info.list_img}" class="input-text fl mr10" size="30">
                            <div id="J_upload_img" class="upload_btn"><span>{:L('upload')}</span></div> 图片尺寸：458*278
                        </td>
                    </tr>
                    <tr>
                        <th>内页多图 :</th>
                        <td><script id="uploadpic" name="uploadpic" type="text/plain"></script>
                            <input type="button" class="btn btn_submit" style="margin:0 0 10px 10px;" onclick="upImage();" value="选择图片">
                            <div id="imageList">
                                <ul class="list clearfix">
                                    <volist name="img_list" id="vo">
                                        <li>
                                            <img width="113" height="113" alt="{$vo.alt}" src="{$vo.img}">
                                            <input type="hidden" value="{$vo.img}" name="pic[pic][]">
                                            <input type="text" class="imgtitletxt" value="{$vo.alt}" name="pic[alt][]">
                                            <div class="delbox"><span class="del">删除</span></div>
                                        </li>
                                    </volist>
                                </ul>
                            </div>
                            <input type="hidden" name="file" id="file" />
                        </td>
                    </tr>
					<tr>
						<th>{:L('publish')} :</th>
                        <td>
                            <label><input type="radio" name="status" class="radio_style" value="1" <if condition="$info.status eq '1'">checked="checked"</if>> {:L('yes')}</label>&nbsp;&nbsp;
                            <label><input type="radio" name="status" class="radio_style" value="0" <if condition="$info.status eq '0'">checked="checked"</if>> {:L('no')}</label>
                        </td>
					</tr>
                    <tr>
                        <th>详细内容 :</th>
                        <td><script id="info" name="info" type="text/plain">{$info.info}</script></td>
                    </tr>
				</table>
			</div>
            <div class="content_list pad_10 hidden">
                <table width="100%" cellspacing="0" class="table_form">
                    <tr>
                        <th width="120">{:L('seo_title')} :</th>
                        <td><input type="text" name="seo_title" id="seo_title" value="{$info.seo_title}" class="input-text" size="60"></td>
                    </tr>
                    <tr>
                        <th>{:L('seo_keys')} :</th>
                        <td><input type="text" name="seo_keys" id="seo_keys" value="{$info.seo_keys}" class="input-text" size="60"></td>
                    </tr>
                    <tr>
                        <th>{:L('seo_desc')} :</th>
                        <td><textarea name="seo_desc" id="seo_desc" cols="80" rows="8">{$info.seo_desc}</textarea></td>
                    </tr>
                </table>
            </div>
            </div>
		<div class="mt10"><input type="submit" value="{:L('submit')}" id="dosubmit" name="dosubmit" class="btn btn_submit" style="margin:0 0 10px 100px;"><br /><br /><br /></div>
	</div>
</div>
</form>
<include file="Public:footer" />
<js file="__STATIC__/js/calendar/WdatePicker.js" charset="utf-8" />
<script src="__JS__/fileuploader.js"></script>
<script type="text/javascript">
    var check_name_url = "{:U('Group/ajaxCheckTitle')}";
    $(function(){
        $('ul.J_tabs').tabs('div.J_panes > div');
        $.formValidator.initConfig({formid:"info_form",autotip:true});

        //上传图片
        var img_uploader = new qq.FileUploaderBasic({
            allowedExtensions: ['jpg','gif','jpeg','png','bmp','pdg'],
            button: document.getElementById('J_upload_img'),
            multiple: false,
            action: "{:U('Group/ajax_upload_img')}",
            inputName: 'img',
            forceMultipart: true, //用$_FILES
            messages: {
                typeError: lang.upload_type_error,
                sizeError: lang.upload_size_error,
                minSizeError: lang.upload_minsize_error,
                emptyError: lang.upload_empty_error,
                noFilesError: lang.upload_nofile_error,
                onLeave: lang.upload_onLeave
            },
            showMessage: function(message){
                $.pinphp.tip({content:message, icon:'error'});
            },
            onSubmit: function(id, fileName){
                $('#J_upload_img').addClass('btn_disabled').find('span').text(lang.uploading);
            },
            onComplete: function(id, fileName, result){
                $('#J_upload_img').removeClass('btn_disabled').find('span').text(lang.upload);
                if(result.status == '1'){
                    $('#J_img').val(result.data);
                } else {
                    $.pinphp.tip({content:result.msg, icon:'error'});
                }
            }
        });
    });
   </script>
<js file="__STATIC__/ueditor/ueditor.config.js" charset="utf-8" />
<js file="__STATIC__/ueditor/ueditor.all.min.js" charset="utf-8" />
<js file="__STATIC__/ueditor/lang/zh-cn/zh-cn.js" charset="utf-8" />
<script type="text/javascript">
    window.UEDITOR_HOME_URL='__STATIC__/ueditor/';
    window.onload=function(){
        window.UEDITOR_CONFIG.initialFrameWidth=880;
        window.UEDITOR_CONFIG.initialFrameHeight=500;
        UE.getEditor('info');
        upmoreimg(true);
    }
</script>
<js file="__JS__/uploadImg.js" charset="utf-8" />
</body>
</html>